package com.domain;

import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

@Data
public class CustomerTraceHistory {
    private Long id;
    //跟进时间
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date traceTime;
    //跟进内容
    private String traceDetails;
    //跟进方式/交流方式
    private SystemDictionaryItem traceType;
    //跟进结果
    private Integer traceResult = 2;
    //客户
    private Customer customer;
    //录入人
    private Employee inputUser;

    public String getResultName() {
        switch (traceResult) {
            case 1:
                return "差";
            case 3:
                return "优";
            default:
                return "中";
        }
    }
}